package week08.company02;

/**
 * Created by zhangxiaokun on 2018/3/21.
 */
public abstract class Mediator {
    protected Stock stock;        //存货部
    protected Sale sale;          //销售部
    protected  Purchase purchase; //采购部

    public Mediator() {
        stock = new Stock(this);
        sale = new Sale(this);
        purchase = new Purchase(this);
    }

    public abstract void execute(String type, Object... obj);

    public Stock getStock() {
        return stock;
    }

    public void setStock(Stock stock) {
        this.stock = stock;
    }

    public Sale getSale() {
        return sale;
    }

    public void setSale(Sale sale) {
        this.sale = sale;
    }

    public Purchase getPurchase() {
        return purchase;
    }

    public void setPurchase(Purchase purchase) {
        this.purchase = purchase;
    }
}
